package com.autonavi.yunda.yunji.core.model.mappers;

import com.autonavi.yunda.yunji.core.model.condition.InterfaceQueryCondition;
import com.autonavi.yunda.yunji.core.model.dto.InterfaceConfigDTO;
import com.autonavi.yunda.yunji.core.vo.response.SimpleInterfaceConfigVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author cizhong.wcs
 * @date 2022/5/25 15:35
 */
@Mapper
public interface InterfaceConfigMapper extends BaseMapper<InterfaceConfigDTO> {
    Page<String> listDistinctUri(Page<String> page, @Param("condition") InterfaceQueryCondition condition);

    List<Map<String, Object>> getProjectCountMap(@Param("projectIds") List<String> projectIds);

    List<SimpleInterfaceConfigVO> listSimpleInterfaceConfig(@Param("condition") InterfaceQueryCondition condition);

    @Select("select id from yunji_interface_config")
    List<Long> listAllIds();
}
